let parseData = require('./ParseProtoData');
let LoginData = require('./LoginData');
let protoSCCmd = require('../protoBuf/protoSCCmd');
let DataManager = {
    DataHander(msg){
        let data = parseData.csData(msg);
        console.log('data>>>',data);
        if(data.mid == 10001){
            let _data = LoginData.scData(data)
            let e1 = parseData.scData(protoSCCmd.id[data.mid], data.mid, _data);
            let e = parseData.toBuffer(e1)
            return e
        }else{
            console.warn('协议号未定义',mid);
            return null;
        }
    }
}

module.exports = DataManager;